//package com.chao.swagger.config;
//
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.oas.annotations.EnableOpenApi;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//
///**
// * 此处与注解声明 二选一，当前使用注解方式
// * @author Luck Chao
// * @Date: 2021/11/25
// */
//@Configuration
//@EnableOpenApi
//public class SwaggerConfig {
//
//    @Value("${swagger.enable:false}")
//    private boolean enable;
//
//    @Bean
//    public Docket createRestApi() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .enable(enable)
//                .apiInfo(apiInfo())
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("com.chao.controller"))
//                .paths(PathSelectors.any())
//                .build();
//    }
//
//    private ApiInfo apiInfo() {
//        return new ApiInfoBuilder()
//                .title("LUCK CHAO - 接口文档")
//                .description("提供可视化接口文档与接口测试工具")
//                .termsOfServiceUrl("https://gitee.com/feixingchaoren/projects/")
//                .license("LUCK CHAO --版权所有")
//                .build();
//    }
//
//}
